package com.shenzhen.horselive.common;

import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;

public abstract class SafeConsumer<T> implements Observer<T> {
    @Override
    public void onSubscribe(Disposable d) {

    }

    @Override
    public void onNext(T t) {
        accept(t);
    }

    public abstract void accept(T t);

    @Override
    public void onError(Throwable e) {
        e.printStackTrace();
    }

    @Override
    public void onComplete() {

    }
}